package cn.itcast.order.RestTemplate;


import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

@Component
public class BeanFactory {

    @Bean
    public static RestTemplate getRestTemplate(){
        return new RestTemplate();
    }


    @Bean("curTemplate")
    @LoadBalanced
    public RestTemplate RestTemplate(){
        return new RestTemplate();
    }
}
